package com.zx.mes.hyl.entity;

import java.util.ArrayList;
import java.util.Date;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.List;

/**
 * <p>
 *  tuser 实体类
 * </p>
 *
 * @author 华云龙
 * @since 2018-07-02
 */
public class Tuser extends Model<Tuser> {

    private static final long serialVersionUID = 1L;

    private String id;

    private String username;
    private String password;
    private Date createdatetime;

    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @TableField(exist=false)
    private Date createdatetimeStart;

    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @TableField(exist=false)
    private Date createdatetimeEnd;

    private Date modifydatetime;

    @TableField(exist=false)
    private List<Trole> roleList = new ArrayList<>();

    @TableField(exist=false)
    private List<Tresource> resourceList = new ArrayList<>();

    @TableField(exist=false)
    private List<Tmenu> menuList = new ArrayList<>();

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public Date getCreatedatetime() {
        return createdatetime;
    }

    public void setCreatedatetime(Date createdatetime) {
        this.createdatetime = createdatetime;
    }

    public Date getModifydatetime() {
        return modifydatetime;
    }

    public void setModifydatetime(Date modifydatetime) {
        this.modifydatetime = modifydatetime;
    }

    public List<Trole> getRoleList() {
        return roleList;
    }

    public void setRoleList(List<Trole> roleList) {
        this.roleList = roleList;
    }

    public Date getCreatedatetimeStart() {
        return createdatetimeStart;
    }

    public void setCreatedatetimeStart(Date createdatetimeStart) {
        this.createdatetimeStart = createdatetimeStart;
    }

    public Date getCreatedatetimeEnd() {
        return createdatetimeEnd;
    }

    public void setCreatedatetimeEnd(Date createdatetimeEnd) {
        this.createdatetimeEnd = createdatetimeEnd;
    }

    public List<Tresource> getResourceList() {
        return resourceList;
    }

    public void setResourceList(List<Tresource> resourceList) {
        this.resourceList = resourceList;
    }

    public List<Tmenu> getMenuList() {
        return menuList;
    }

    public void setMenuList(List<Tmenu> menuList) {
        this.menuList = menuList;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "Tuser{" +
        "id=" + id +
        ", username=" + username +
        ", password=" + password +
        ", createdatetime=" + createdatetime +
        ", modifydatetime=" + modifydatetime +
        "}";
    }
}
